package edu.sctu.practice.class02.xuejiahua.practise.test03;

/**
 * Created by Dom_xuejiahua on 2015/12/9.
 */
public class UpDemo {public static void main(String[] args) {
    Employee[] arr = new Employee[2];
    arr[0] = new Employee("王五", "男");

    Manager m = new Manager("李四", "女");
    arr[1] = m;
    m.setDividend(39990);

    for (Employee e : arr) {
        e.setWage(4000);
        e.setBonus(2000);
        e.setAge(25);
        System.out.println("姓名：" + e.getName());
        System.out.println("性别：" + e.getSex());
        System.out.println("年龄：" + e.getAge());
        System.out.println("工资：" + e.getWage());
        System.out.println("奖金：" + e.getBonus());
        System.out.println("收入：" + e.getInCome());
    }
}
}
